<?php
namespace ImiApp\Module\Member\Service\Base;

use Imi\Model\Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 附件表 基类
 * @Entity
 * @Table(name="sc_attachment", id={"id"})
 * @DDL("CREATE TABLE `sc_attachment` (
  `id` int(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '物理路径',
  `imagewidth` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '宽度',
  `imageheight` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '高度',
  `imagetype` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '图片类型',
  `imageframes` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '图片帧数',
  `filename` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '文件名称',
  `filesize` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小',
  `mimetype` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'mime类型',
  `extparam` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '透传数据',
  `createtime` int(10) DEFAULT NULL COMMENT '创建日期',
  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  `uploadtime` int(10) DEFAULT NULL COMMENT '上传时间',
  `storage` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'local' COMMENT '存储位置',
  `sha1` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '文件 sha1编码',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='附件表'")
 * @property int $id ID
 * @property int $adminId 管理员ID
 * @property int $userId 会员ID
 * @property string $url 物理路径
 * @property string $imagewidth 宽度
 * @property string $imageheight 高度
 * @property string $imagetype 图片类型
 * @property int $imageframes 图片帧数
 * @property string $filename 文件名称
 * @property int $filesize 文件大小
 * @property string $mimetype mime类型
 * @property string $extparam 透传数据
 * @property int $createtime 创建日期
 * @property int $updatetime 更新时间
 * @property int $uploadtime 上传时间
 * @property string $storage 存储位置
 * @property string $sha1 文件 sha1编码
 */
abstract class ScAttachmentBase extends Model
{
    /**
     * ID
     * id
     * @Column(name="id", type="int", length=20, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id - ID
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id - ID
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 管理员ID
     * admin_id
     * @Column(name="admin_id", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $adminId;

    /**
     * 获取 adminId - 管理员ID
     *
     * @return int
     */ 
    public function getAdminId()
    {
        return $this->adminId;
    }

    /**
     * 赋值 adminId - 管理员ID
     * @param int $adminId admin_id
     * @return static
     */ 
    public function setAdminId($adminId)
    {
        $this->adminId = $adminId;
        return $this;
    }

    /**
     * 会员ID
     * user_id
     * @Column(name="user_id", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $userId;

    /**
     * 获取 userId - 会员ID
     *
     * @return int
     */ 
    public function getUserId()
    {
        return $this->userId;
    }

    /**
     * 赋值 userId - 会员ID
     * @param int $userId user_id
     * @return static
     */ 
    public function setUserId($userId)
    {
        $this->userId = $userId;
        return $this;
    }

    /**
     * 物理路径
     * url
     * @Column(name="url", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $url;

    /**
     * 获取 url - 物理路径
     *
     * @return string
     */ 
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * 赋值 url - 物理路径
     * @param string $url url
     * @return static
     */ 
    public function setUrl($url)
    {
        $this->url = $url;
        return $this;
    }

    /**
     * 宽度
     * imagewidth
     * @Column(name="imagewidth", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $imagewidth;

    /**
     * 获取 imagewidth - 宽度
     *
     * @return string
     */ 
    public function getImagewidth()
    {
        return $this->imagewidth;
    }

    /**
     * 赋值 imagewidth - 宽度
     * @param string $imagewidth imagewidth
     * @return static
     */ 
    public function setImagewidth($imagewidth)
    {
        $this->imagewidth = $imagewidth;
        return $this;
    }

    /**
     * 高度
     * imageheight
     * @Column(name="imageheight", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $imageheight;

    /**
     * 获取 imageheight - 高度
     *
     * @return string
     */ 
    public function getImageheight()
    {
        return $this->imageheight;
    }

    /**
     * 赋值 imageheight - 高度
     * @param string $imageheight imageheight
     * @return static
     */ 
    public function setImageheight($imageheight)
    {
        $this->imageheight = $imageheight;
        return $this;
    }

    /**
     * 图片类型
     * imagetype
     * @Column(name="imagetype", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $imagetype;

    /**
     * 获取 imagetype - 图片类型
     *
     * @return string
     */ 
    public function getImagetype()
    {
        return $this->imagetype;
    }

    /**
     * 赋值 imagetype - 图片类型
     * @param string $imagetype imagetype
     * @return static
     */ 
    public function setImagetype($imagetype)
    {
        $this->imagetype = $imagetype;
        return $this;
    }

    /**
     * 图片帧数
     * imageframes
     * @Column(name="imageframes", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $imageframes;

    /**
     * 获取 imageframes - 图片帧数
     *
     * @return int
     */ 
    public function getImageframes()
    {
        return $this->imageframes;
    }

    /**
     * 赋值 imageframes - 图片帧数
     * @param int $imageframes imageframes
     * @return static
     */ 
    public function setImageframes($imageframes)
    {
        $this->imageframes = $imageframes;
        return $this;
    }

    /**
     * 文件名称
     * filename
     * @Column(name="filename", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $filename;

    /**
     * 获取 filename - 文件名称
     *
     * @return string
     */ 
    public function getFilename()
    {
        return $this->filename;
    }

    /**
     * 赋值 filename - 文件名称
     * @param string $filename filename
     * @return static
     */ 
    public function setFilename($filename)
    {
        $this->filename = $filename;
        return $this;
    }

    /**
     * 文件大小
     * filesize
     * @Column(name="filesize", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $filesize;

    /**
     * 获取 filesize - 文件大小
     *
     * @return int
     */ 
    public function getFilesize()
    {
        return $this->filesize;
    }

    /**
     * 赋值 filesize - 文件大小
     * @param int $filesize filesize
     * @return static
     */ 
    public function setFilesize($filesize)
    {
        $this->filesize = $filesize;
        return $this;
    }

    /**
     * mime类型
     * mimetype
     * @Column(name="mimetype", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $mimetype;

    /**
     * 获取 mimetype - mime类型
     *
     * @return string
     */ 
    public function getMimetype()
    {
        return $this->mimetype;
    }

    /**
     * 赋值 mimetype - mime类型
     * @param string $mimetype mimetype
     * @return static
     */ 
    public function setMimetype($mimetype)
    {
        $this->mimetype = $mimetype;
        return $this;
    }

    /**
     * 透传数据
     * extparam
     * @Column(name="extparam", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $extparam;

    /**
     * 获取 extparam - 透传数据
     *
     * @return string
     */ 
    public function getExtparam()
    {
        return $this->extparam;
    }

    /**
     * 赋值 extparam - 透传数据
     * @param string $extparam extparam
     * @return static
     */ 
    public function setExtparam($extparam)
    {
        $this->extparam = $extparam;
        return $this;
    }

    /**
     * 创建日期
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建日期
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建日期
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

    /**
     * 更新时间
     * updatetime
     * @Column(name="updatetime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $updatetime;

    /**
     * 获取 updatetime - 更新时间
     *
     * @return int
     */ 
    public function getUpdatetime()
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间
     * @param int $updatetime updatetime
     * @return static
     */ 
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = $updatetime;
        return $this;
    }

    /**
     * 上传时间
     * uploadtime
     * @Column(name="uploadtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $uploadtime;

    /**
     * 获取 uploadtime - 上传时间
     *
     * @return int
     */ 
    public function getUploadtime()
    {
        return $this->uploadtime;
    }

    /**
     * 赋值 uploadtime - 上传时间
     * @param int $uploadtime uploadtime
     * @return static
     */ 
    public function setUploadtime($uploadtime)
    {
        $this->uploadtime = $uploadtime;
        return $this;
    }

    /**
     * 存储位置
     * storage
     * @Column(name="storage", type="varchar", length=100, accuracy=0, nullable=false, default="local", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $storage;

    /**
     * 获取 storage - 存储位置
     *
     * @return string
     */ 
    public function getStorage()
    {
        return $this->storage;
    }

    /**
     * 赋值 storage - 存储位置
     * @param string $storage storage
     * @return static
     */ 
    public function setStorage($storage)
    {
        $this->storage = $storage;
        return $this;
    }

    /**
     * 文件 sha1编码
     * sha1
     * @Column(name="sha1", type="varchar", length=40, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $sha1;

    /**
     * 获取 sha1 - 文件 sha1编码
     *
     * @return string
     */ 
    public function getSha1()
    {
        return $this->sha1;
    }

    /**
     * 赋值 sha1 - 文件 sha1编码
     * @param string $sha1 sha1
     * @return static
     */ 
    public function setSha1($sha1)
    {
        $this->sha1 = $sha1;
        return $this;
    }

}
